<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="javax.sql.rowset.WebRowSet" %> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>菜品新增和修改</title>
</head>
<body>

<h2>菜品详情</h2>
<%

request.setCharacterEncoding("utf-8");
String foodid = "",foodname = "",fooddescribe = "",foodprice = "",deskid = "";
javax.sql.rowset.WebRowSet rs = com.myweb.DBTools.getRS("SELECT * FROM shoppingcart WHERE foodid="+request.getParameter("id"));
while(rs.next()){
	foodid = rs.getString("foodid");
	foodname = rs.getString("foodname");
	fooddescribe = rs.getString("fooddescribe");
	foodprice = rs.getString("foodprice");
	deskid = rs.getString("deskid");
}
rs.close();
%>
<form action="save.jsp" method="post">
<label for="foodid">foodid</label>
<input type="text" id="foodid" name="foodid" value="<%=foodid %>" readonly><br>
<label for="foodname">菜品名</label>
<input type="text" id="foodname" name="foodname" value="<%=foodname %>" ><br>
<label for="fooddescribe">详情</label>
<input type="text" id="fooddescribe" name="fooddescribe" value="<%=fooddescribe %>" ><br>
<label for="foodprice">价格</label>
<input type="number" id="foodprice" name="foodprice" value="<%=foodprice %>" ><br>
<input type="submit" name="btn" value="修改">
<input type="submit" name="btn" value="新增"><br>

</form>

</body>
</html>